# -*- coding: utf-8 -*-
#!/usr/bin/env python

import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web

from utils import random_string


class UploadModule(tornado.web.UIModule):
    def render(self, ptype, pic_id='0'):
        hash_id = random_string(10)
        return self.render_string(
            "module_upload.html", ptype=ptype,
            pic_id=pic_id, hash_id=hash_id)
